package com.medusa.aps.business.modules.modeling.model.output;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 工艺工序返回结果
 *
 * @author miskw
 * @date 2023/9/1
 */
@Data
@Accessors(chain = true)
public class TechnologicalProcessVO {
    /**
     * 主键
     */
    @Schema(description = "主键")
    private Integer id;
    /**
     * 工序id
     */
    @Schema(description = "工序id")
    private Integer processId;
    /**
     * 工序号
     */
    @Schema(description = "工序号")
    private Integer processNumber;
    /**
     * 工序编码
     */
    @Schema(description = "工序编码")
    private String processCode;
    /**
     * 工序名称
     */
    @Schema(description = "工序名称")
    private String processName;
    /**
     * 换型时间
     */
    @Schema(description = "换型时间")
    private Long replacementTime;
    /**
     * 转运批量
     */
    @Schema(description = "转运批量")
    private Long transshipmentBatch;
    /**
     * 转运时间
     */
    @Schema(description = "转运时间")
    private Long transshipmentTime;
    /**
     * 加工内容
     */
    @Schema(description = "加工内容")
    private String processingContent;
    /**
     * 工序设备
     */
    @Schema(description = "工序设备")
    private List<ProcessEquipmentVO> processEquipments;

    public OrderTechnologicalProcessVO toTechnologicalProcessVO() {
        return new OrderTechnologicalProcessVO()
                .setId(id)
                .setProcessNumber(processNumber)
                .setProcessCode(processCode)
                .setProcessName(processName)
                .setReplacementTime(replacementTime)
                .setTransshipmentBatch(transshipmentBatch)
                .setTransshipmentTime(transshipmentTime)
                .setProcessingContent(processingContent);

    }
}
